
REPLICATION FILES FOR:  
	
	Profiling Compliers and Non-compliers for Instrumental-Variable Analysis 
	Political Analysis
	Moritz Marbach and Dominik Hangartner

	Please contact Moritz Marbach if you have any problems 
	or questions about these replication files: moritz.marbach@gess.ethz.ch 
	Updated contact details are also available at: moritz-marbach.com

	November 28, 2019
	

OVERVIEW
=========

The current version of the ivdesc package can be installed via 

	install.packages("ivdesc")

	or 

	devtools::install_github("sumtxt/ivdesc/R/ivdesc")
	library(ivdesc)

The version used in the paper (1.0.0) via: 
	
	devtools::install_local("./software/ivdesc/"

All estimates presented in the paper are obtained using R and can be replicated by running main.R. The runtime is less than 1 min. To replicate the Monte Carlo simulations run mc.R. The simulations run for about 5 hours on an AWS cluster with 8 cores (c5.2xlarge) and about 10 hours in our local environment. To replicate the exact numerical results, use the same computational environment as described below. Otherwise some numerical deviations are to be expected.

Note that http://github.com/sumtxt/ivdesc also provides a corresponding software package for STATA.




CORRESPONDENCE
==============

Main Text: 

Figure 1: fig_1.pdf via application.R  


Supplementary Materials:

Figure S.1: fig_s1.pdf via mc_results.R
Figure S.2: fig_s2.pdf via mc_results.R
Figure S.3: fig_s3.pdf via fox_news_application.R 

Table S.1: tab_s1.tex via application.R 
Table S.2: tab_s2.tex via application.R 
Table S.3: tab_s3.tex via fox_news_application.R 
Table S.4: tab_s4.tex via fox_news_application.R 



R sessionInfo() 
================

R version 3.6.1 (2019-07-05)
Platform: x86_64-apple-darwin18.6.0 (64-bit)
Running under: macOS Mojave 10.14.6

Matrix products: default
BLAS/LAPACK: /usr/local/Cellar/openblas/0.3.7/lib/libopenblasp-r0.3.7.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] MonteCarlo_1.0.6  snow_0.4-3        icsw_1.0.0        xtable_1.8-4     
 [5] texreg_1.36.23    ivdesc_1.0.0      AER_1.2-7         survival_2.44-1.1
 [9] sandwich_2.5-1    lmtest_0.9-37     zoo_1.8-6         car_3.0-3        
[13] carData_3.0-2     haven_2.1.1       forcats_0.4.0     stringr_1.4.0    
[17] dplyr_0.8.3       purrr_0.3.2       readr_1.3.1       tidyr_1.0.0      
[21] tibble_2.1.3      ggplot2_3.2.1     tidyverse_1.2.1  

loaded via a namespace (and not attached):
 [1] httr_1.4.1        jsonlite_1.6      splines_3.6.1     modelr_0.1.5     
 [5] Formula_1.2-3     assertthat_0.2.1  cellranger_1.1.0  globals_0.12.4   
 [9] pillar_1.4.2      backports_1.1.5   lattice_0.20-38   glue_1.3.1       
[13] digest_0.6.21     rvest_0.3.4       colorspace_1.4-1  plyr_1.8.4       
[17] Matrix_1.2-17     pkgconfig_2.0.3   broom_0.5.2       listenv_0.7.0    
[21] scales_1.0.0      openxlsx_4.1.0.1  rio_0.5.16        rlecuyer_0.3-4   
[25] generics_0.0.2    ellipsis_0.3.0    withr_2.1.2       furrr_0.1.0      
[29] lazyeval_0.2.2    cli_1.1.0         magrittr_1.5      crayon_1.3.4     
[33] readxl_1.3.1      future_1.14.0     nlme_3.1-141      xml2_1.2.2       
[37] foreign_0.8-72    tools_3.6.1       data.table_1.12.2 hms_0.5.1        
[41] lifecycle_0.1.0   rsample_0.0.5     munsell_0.5.0     zip_2.0.4        
[45] compiler_3.6.1    snowfall_1.84-6.1 rlang_0.4.0       grid_3.6.1       
[49] rstudioapi_0.10   labeling_0.3      gtable_0.3.0      codetools_0.2-16 
[53] abind_1.4-5       reshape_0.8.8     curl_4.2          reshape2_1.4.3   
[57] R6_2.4.0          lubridate_1.7.4   knitr_1.25        zeallot_0.1.0    
[61] stringi_1.4.3     parallel_3.6.1    Rcpp_1.0.2        vctrs_0.2.0      
[65] tidyselect_0.2.5  xfun_0.10

Further information: 

Processor: 3.5 GHz Intel Core i7
Memory: 16 GB




For the Monte Carlo simulation only (mc.R): 

R version 3.4.4 (2018-03-15)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 18.04.3 LTS

Matrix products: default
BLAS: /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.7.1
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.7.1

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] ivdesc_1.0.0      MonteCarlo_1.0.6  snow_0.4-3        extraDistr_1.8.11

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.2        knitr_1.25        magrittr_1.5      tidyselect_0.2.5 
 [5] R6_2.4.0          rlang_0.4.0       rlecuyer_0.3-4    plyr_1.8.4       
 [9] dplyr_0.8.3       globals_0.12.4    tools_3.4.4       parallel_3.4.4   
[13] snowfall_1.84-6.1 xfun_0.10         digest_0.6.21     abind_1.4-5      
[17] assertthat_0.2.1  lifecycle_0.1.0   tibble_2.1.3      crayon_1.3.4     
[21] tidyr_1.0.0       furrr_0.1.0       purrr_0.3.2       vctrs_0.2.0      
[25] codetools_0.2-15  zeallot_0.1.0     glue_1.3.1        compiler_3.4.4   
[29] pillar_1.4.2      backports_1.1.5   generics_0.0.2    future_1.14.0    
[33] rsample_0.0.5     reshape_0.8.8     listenv_0.7.0     pkgconfig_2.0.3  

Further information: 

Processor: 3.4 GHz Intel Xeon Platinum 8000 series (AWS c5.2xlarge)
Memory: 16 GiB	
